﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Compiled_Tests.Utils;
using Compiled_Tests.AutomationAbstractions;
using LEET.CommonInterfaces.Automation;
using LEET.LEETCommon;

namespace Compiled_Tests.ProcessWrappers
{
    public class ProcessWrapper : IProcess
    {
        public ProcessWrapper(Process p, String name)
        {
            this.Process = p;
            this.Name = name;
            RootWidget = new ObservableWidget(Utilities.Get_MainAE(p));
        }

        public string Name
        {
            get;
            private set;
        }

        public Process Process
        {
            get;
            private set;
        }

        public IObservableWidget RootWidget
        {
            get;
            private set;
        }

        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is IProcess))
                return false;
            IProcess proc = obj as IProcess;

            if (Process.Equals(proc.Process))
                return true;

            return base.Equals(obj);
        }
    }
}
